package com.stylefeng.guns.modular.customer.transfer;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import java.util.ArrayList;
import java.util.List;

/**
 * 客户Excel导入模板类
 */
@Data
public class CustomerCompanyXlsM {


    @Excel(name = "客户企业名称",width = 20)
    @NotBlank(message = "客户企业名称不能为空")
    private String name;

    @Excel(name = "统一社会信用代码",width = 20)
    @NotBlank(message = "统一社会信用代码不能为空")
    private String unifiedSocialCreditCode;

    @Excel(name = "企业简称")
    @NotBlank(message = "企业简称不能为空")
    private String shortName;

    @Excel(name = "法定代表人")
    @NotBlank(message = "法定代表人不能为空")
    private String legalPerson;

    @ExcelIgnore
    private Integer corporationId;

    @Excel(name = "所属集团")
    @NotBlank(message = "所属集团不能为空")
    private String corporation;

    @Excel(name = "所属板块")
    private String section;

    @Excel(name = "军工代码")
    private String militaryCode;

    @ExcelIgnore
    private Integer areaId;

    @Excel(name = "所属区域",width = 20)
    @NotBlank(message = "所属区域不能为空")
    private String area;

    @Excel(name = "主营业务或产品",height = 10,width = 50)
    private String mainBusiness;

    /**下面是客户业务管理*/
    @ExcelIgnore
    private Integer customerCompanyId;

    @ExcelIgnore
    private String customerTypeCode;

    @Excel(name = "客户类型")
    @NotEmpty(message = "客户类型不能为空")
    private String customerType;

    @Excel(name = "年销售收入规模（万元）",width = 20)
    private String annualIncome;

    @Excel(name = "客户数量")
    private String customerNum;

    @Excel(name = "年度采购规模（万元）" ,width = 20)
    private String annualPurchaseAmount;

    @Excel(name = "供应商数量")
    private String providerNum;

    @ExcelIgnore
    private Integer departId;

    @Excel(name = "所属部门")
    @NotEmpty(message ="所属部门不能为空" )
    private String  departName;

    @ExcelIgnore
    private Integer salesmanId;

    @Excel(name = "负责销售")
    @NotEmpty(message ="负责销售不能为空" )
    private String salesmanName;

    @ExcelIgnore
    private Integer sourceCode;

    @Excel(name = "信息来源")
    private String source;

    @Excel(name = "建行账户",width = 15,replace = {"是_1","否_-1"})
    @NotEmpty(message ="建行账户不能为空" )
    private String isCcb;
    /**
     * 是否计划开户
     */
    @Excel(name = "计划开户",width = 15,replace = {"是_1","否_-1"})
    @NotEmpty(message ="计划开户不能为空" )
    private String isPlanToOpenAccount;

    @Excel(name = "当前状态",width = 30)
    private String state;


    public static List<CustomerCompanyXlsM> example(){
        List<CustomerCompanyXlsM> list = new ArrayList<>();
        CustomerCompanyXlsM customerCompanyXlsM = new CustomerCompanyXlsM();
        list.add(customerCompanyXlsM);
        customerCompanyXlsM.setName("xxx有限公司");
        customerCompanyXlsM.setUnifiedSocialCreditCode("91440300088450013U");
        customerCompanyXlsM.setShortName("xxx");
        customerCompanyXlsM.setMilitaryCode("0x1100");
        customerCompanyXlsM.setLegalPerson("张大山");
        customerCompanyXlsM.setCorporation("航空");
        customerCompanyXlsM.setSection("销售一部");
        customerCompanyXlsM.setArea("华北区/河北/石家庄");
        customerCompanyXlsM.setMainBusiness("主机制造");

        customerCompanyXlsM.setCustomerType("核心企业");
        customerCompanyXlsM.setAnnualIncome("1000");
        customerCompanyXlsM.setCustomerNum("10");
        customerCompanyXlsM.setAnnualPurchaseAmount("500");
        customerCompanyXlsM.setProviderNum("10");
        customerCompanyXlsM.setDepartName("产品部");
        customerCompanyXlsM.setSalesmanName("张三");
        customerCompanyXlsM.setSource("直销");
        customerCompanyXlsM.setIsCcb("是");
        customerCompanyXlsM.setIsPlanToOpenAccount("否");
        customerCompanyXlsM.setState("跟进");
        return list;
    }
}
